import requests


# 创建接口对象层
class IhrmLoginApi(object):
    @classmethod
    def login(cls, json_data):
        resp= requests.post(url="http://ihrm2-test.itheima.net/api/sys/login",
                             headers={"Content-type": "application/json"},
                             json=json_data)
        return resp


if __name__ == '__main__':
    json_data = {"mobile": "13800000002", "password": "888itcast.CN764%..."}
    resp = IhrmLoginApi.login(json_data)
    print(resp.json())
